# $Id: PKGBUILD 80895 2012-12-06 03:29:49Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Philacorns <opuspace@gmail.com>

pkgname=wqy-microhei
pkgver=0.2.0_beta
pkgrel=5
pkgdesc="A Sans-Serif style high quality CJK outline font."
arch=('any')
license=('GPL3' 'APACHE' 'custom:"font embedding exception"')
install=wqy-microhei.install
url="http://wenq.org"
depends=('fontconfig' 'xorg-font-utils')
source=("http://downloads.sourceforge.net/project/wqy/$pkgname/${pkgver//_/-}/$pkgname-${pkgver//_/-}.tar.gz"
        '44-wqy-microhei.conf')
md5sums=('a124c5c6606f4f3b733d3477380e9d2f'
         '2614129902fda4e45aa7f0f7b635cc4f')
build() {
  cd "$srcdir/$pkgname"
  tail README.txt --lines=16|head --lines=-3>| FONTEXCEPTION
}

package() {
  install -d "$pkgdir/etc/fonts/conf.d/"
  install -Dm644 "$srcdir/44-wqy-microhei.conf" "$pkgdir/etc/fonts/conf.avail/44-wqy-microhei.conf"
  install -Dm644 "$srcdir/$pkgname/wqy-microhei.ttc" "$pkgdir/usr/share/fonts/wenquanyi/$pkgname/wqy-microhei.ttc"
  install -Dm644 "$srcdir/$pkgname/FONTEXCEPTION" "$pkgdir/usr/share/licenses/$pkgname/FONTEXCEPTION"
  cd "$pkgdir/etc/fonts/conf.d/"
  ln -s ../conf.avail/44-wqy-microhei.conf .
}
